  <tr valign="top">
    <td height="40" align="left" class="dato" background="/images/topHeader.gif" colspan="4">Eventos</td>
  </tr>
    <tr>
     <td colspan="4" align="center" background="/images/vg.jpg"><span class="subdatos">Edición de <%= @event.name %></td>
  </tr>
    <tr><td>&nbsp;</td></tr>

<% form_for(@event) do |f| %>
  <%= f.error_messages %>
 <tr>
 	<td>Nombre : <%= f.text_field :name, :size => 30 %></td>
 </tr>
      <tr><td>&nbsp;</td></tr>
  <tr>
 	<td>Descrip : <%= f.text_field :description, :size =>30 %></td>
 </tr>
     <tr><td>&nbsp;</td></tr>
  <tr>
  	 </tr>
      <tr><td>&nbsp;</td></tr>
  <tr>
 	<td>Fecha Evento: <% CalendarDateSelect.format=(:iso_date)%>
		<%= calendar_date_select_includes %> 
		<%= f.calendar_date_select :eventstart, :year_range => 0.years.from_now.year..20.years.from_now.year %></td>
 </tr>
     <tr><td>&nbsp;</td></tr>
  <tr>
 	<td>Fin Evento: <% CalendarDateSelect.format=(:iso_date)%>
		<%= calendar_date_select_includes %> 
		<%= f.calendar_date_select :eventfinish, :year_range => 0.years.from_now.year..20.years.from_now.year %></td>
 </tr>
     <tr><td>&nbsp;</td></tr>
  <tr>   
     <td colspan="4" align="center" background="/images/vg.jpg"><span class="subdatos">Fecha de Apuestas</td>
  </tr> 
       <tr><td>&nbsp;</td></tr>
    <tr>
 	<td>Inicio Apuestas: <% CalendarDateSelect.format=(:iso_date)%>
		<%= calendar_date_select_includes %> 
		<%= f.calendar_date_select :betstart, :year_range => 0.years.from_now.year..20.years.from_now.year %></td>
 </tr>
      <tr><td>&nbsp;</td></tr>
   <tr>
 	<td>Final Apuestas : <% CalendarDateSelect.format=(:iso_date)%>
		<%= calendar_date_select_includes %> 
		<%= f.calendar_date_select :betfinish, :year_range => 0.years.from_now.year..20.years.from_now.year %></td>
 </tr>
       <tr><td>&nbsp;</td></tr>
  <tr>
 	<td>Codigo(E1E2YYYY-MM-DD) : <%= f.text_field :cod, :size => 30 %></td>
 </tr>
  <tr>
 	<td><%= f.submit 'Modificar' %></td>
  </tr>
<% end %>

  <tr>
 	<td><%= link_to 'Mostrar', @event %> |
<%= link_to 'Regresar', events_path %></td>
  </tr>

  <tr><td>&nbsp;</td></tr>
  <tr>   
     <td colspan="4" align="center" background="/images/vg.jpg"><span class="subdatos">Edicion de los participantes</td>
  </tr> 
 <tr><td>&nbsp;</td></tr>
 
	<table>
 	<tr align="center">
	<td width="20">&nbsp;</td>
	<td width="65">Equipo</td>
	<td width="65">Proporcion</td>
	<td width="65">Casa/Visitante</td>
	<td width="65">Score</td>
	</tr>
	<% for eventparticipant in Eventparticipant.find_all_by_event_idf(@event.id) %>
    <% @participant=Participant.find_by_id(eventparticipant.participant_idf)  %>
	<tr align="center">
    <td width="20"><%= image_tag(@participant.image,  :size => "60x60", :align => "middle" ) %></td>
    <td width="60" align="left"><strong><%= link_to @participant.name, edit_eventparticipant_path(eventparticipant),  :class => "navbar" %></strong></td>
	<td width="68"><%= eventparticipant.proportion%></td>
	<td width="68"><%= eventparticipant.homevisitant%></td>
	<td width="68"><%= eventparticipant.score%></td>
	</tr>
	</table>
	<table>
<% end %>
  
  
  


